export function formatTableResult(response) {
  const { result, pagination } = response;
  const pageSize = Number(import.meta.env.VITE_API_PAGE_SIZE);
  return {
    result: result || [],
    pagination: {
      ...pagination,
      showQuickJumper: true,
      defaultPageSize: pageSize,
      totalPage: Math.ceil(pagination.total/pageSize),
    },
  }
}

export const defaultPagination = {
  pageSize: Number(import.meta.env.VITE_API_PAGE_SIZE),
  page: 1,
};
